<html>
    <head>
        <title>Uber links</title>
        <meta charset="UTF-8">
        <meta name="description" content="" />
        <script src="js/jquery-1.7.1.js"></script>
        <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
        <script type="text/javascript" src="js/prettify.js"></script>                                   
        <script type="text/javascript" src="js/kickstart.js"></script>  
        <link href='http://fonts.googleapis.com/css?family=Acme' rel='stylesheet' type='text/css' />
        <link rel="stylesheet" type="text/css" href="css/kickstart.css" media="all" />
        <link rel="stylesheet" type="text/css" href="style.css" media="all" />      
        <script>
            function dl(){
                var xhr = null;
	
                if (window.XMLHttpRequest || window.ActiveXObject) {
                    if (window.ActiveXObject) {
                        try {
                            xhr = new ActiveXObject("Msxml2.XMLHTTP");
                        } catch(e) {
                            xhr = new ActiveXObject("Microsoft.XMLHTTP");
                        }
                    } else {
                        xhr = new XMLHttpRequest(); 
                    }
                } else {
                    alert("Votre navigateur ne supporte pas l'objet XMLHTTPRequest...");
                    return null;
                }
    
                xhr.onreadystatechange = function() {
                    if (xhr.readyState == 4 && xhr.status == 200) {
                        alert(xhr.responseText);
                        if(xhr.responseText == "0"){
                            
                            document.getElementById("error").innerHTML = '<p>ERROR</p>';
                        }
                    }
                }
                
                xhr.open("GET", "ajax/dl.php");
                xhr.send();
            }
        </script>
    </head>
    <body>
        <a id="top-of-page"></a>
        <h1 id="container"> > Le site pour les Über Links ! < </h1>
        <div id="wrap" class="clearfix">

            <!-- Menu Horizontal -->
            <?php $page = 'dl-lien';  include 'include/menu.php'; ?>
            
            <div class="tab-content">
                <button onclick="window.open('dl.php')">Télécharger</button>
                <span id="error"></span>
            </div>
        </div>
    </body>
</html>